<div class="news" style="display: none" id="news">
        <p class="news_img">
           <img src="/Public/mui/computer/img/news.png" alt="">
        </p>
        <div class="news_item">
            <p class="hidep channelP">
                <a href="javascript:ajaxtype(5)" class="channelPending">待审渠道(0)</a>
            </p>
            <p class="hidep channelP">
                <a href="javascript:ajaxtype(3)" class="overdue">逾期提醒(0)</a>
            </p>
            <p class="hidep channelP">
                <a href="javascript:ajaxtype(2)" class="repayment">即将还款订单(0)</a>
            </p>
            <p class="hidep channelP">
                <a href="javascript:ajaxtype(1)" class="pending">待审订单(0)</a>
            </p>
            <p class="hidep staymonyl" style="display:none">
                <a href="javascript:ajaxtype(4);" class="staymonytype">代收款订单(0)</a>
            </p>
        </div>
</div>
<script>
    setInterval(function(){
        getonloadtime();
    },180000);
   	window.onload = function(){
	  	getonloadtime();
        newss();
        $('.news').on('mousemove',function(){
            $('.news_item').show();
        });
        $('.news').on('mouseout',function(){
            $('.news_item').hide();
        });
	};
	function getonloadtime(){
		$.ajax({
            //几个参数需要注意一下
            type: "POST",//方法类型
            dataType: "json",//预期服务器返回的数据类型
            url: "/admin/Order/fkcallseven" ,//url
            data: {},
            success: function (result) {
                if(result){
                	if(result.admintype == "5" || result.admintype == "501" ||result.admintype == "502" || result.admintype == "1"){
                		$(".overdue").html("逾期提醒"+"("+result.overdue+")");
	                	$(".repayment").html("即将还款订单("+result.repayment+")");
	                	$(".pending").html("待审订单("+result.pending+")");
	                	$(".channelPending").html("待审渠道("+result.channelPending+")");
                	}else if(result.admintype == "6"){
                		$(".channelP").css("display","none");
                		$(".staymonytype").html("代收款订单("+result.staymonytype+")");
                		$(".staymonyl").css("display","block");
                	}else if(result.admintype == "503"){
                        $(".pending").html("待审订单("+result.pending+")");
                        $(".channelPending").css("display","none");
                        $(".overdue").css("display","none");
                        $(".repayment").css("display","none");
                    }
	  				$(".news").css("display","block");
                }
            },
        },"json");

	}
	function ajaxtype(data){
		$.ajax({
            //几个参数需要注意一下
            type: "POST",//方法类型
            dataType: "json",//预期服务器返回的数据类型
            url: "/admin/Order/editremind" ,//url
            data: {data:data},
            success: function (result) {
                // console.log(result);//打印服务端返回的数据(调试用)
                if(result == "1"){
                	window.location.href="/admin/order/orderlistindex";
                }else if(result == "2"){
                	window.location.href="/admin/order/allOrderList";
                }else if(result == "3"){
                	window.location.href="/admin/order/allOrderList";
                }else if(result == "4"){
                	window.location.href="/admin/Order/OrderPayConfirm";
                }else if(result == "5"){
                	window.location.href="/admin/channel/channellistindex";
                }
                if (result.resultCode == 200) {
                    alert("SUCCESS");
                };
            },
        },"json");
	}
     function newss() {
        var oDiv = document.getElementById('news');
        var disX = 0, disY = 0;
        oDiv.onmousedown = function (ev) {
            var oEvent = ev || event;
            disX = oEvent.clientX - oDiv.offsetLeft;
            disY = oEvent.clientY - oDiv.offsetTop;
            document.onmousemove = function (ev) {
                var oEvent = ev || event;
                var l = oEvent.clientX - disX;
                var t = oEvent.clientY - disY;

                if(l <= 0){ l = 0}
                if(t < 0){t = 0}
                if(l > document.documentElement.clientWidth - oDiv.offsetWidth){
                    l = document.documentElement.clientWidth - oDiv.offsetWidth;
                }
                if(t > document.documentElement.clientHeight - oDiv.offsetHeight){
                    t = document.documentElement.clientHeight - oDiv.offsetHeight;
                }
                oDiv.style.left = l + 'px';
                oDiv.style.top = t + 'px';

            }

            document.onmouseup = function (ev) {
                document.onmousemove = null;
                document.onmouseup = null;
            }

        }
    }

</script>